<include file="Public/head" />
<include file="Public/common_header" />
<div class="mian">
    <include file="Public/sidebar" menu="pmgl.spsh"  />
    <div class="mianR">
        <h3 class="yonghu" style="font-size: 16px">上拍审核</h3>
        <br/>
		<div class="jianBen">
  	  	  <h4>发拍信息</h4>
 	  		<ul class="clearfix">
                <li>场次名称</li>
                <li class="benW">{$head.scene_name}</li>	
               	<li>竞拍时长</li>
               	<li class="benW">{$head.est_elapsed_time}分</li>
               	<li>起拍价</li>
               	<li class="benW">{$head.bid_start_price_show}元</li> 
               	<li>代金券</li>
               	<li class="benW">
               	  <if condition="$head[coupon] gt 0">
               	    {$head.coupon}元
               	  <else/>不可用</if>
               	</li>
               	<li>过户费</li>
               	<li class="benW">{$head.transfer_fee}元</li>
               	<li>交易佣金</li>
               	<li class="benW">{$head.commision}元</li> 
	    	</ul>
   		</div>        
        <div class="testing">
            <h4>协议详情</h4>
            <ul>
                <li class="agreement clearfix">
                	<span>过户限制</span>
                	<em>{$head.transfer_limit}</em>
                	<span>建议起拍价</span>
                	<em>{$head.suggest_bid_start_price}</em>
                	<span>保留价</span>
                	<em>
                        {$head.reserve_price}元
                        <if condition="$head.show_reserve_price eq 1"><img src="{:get_style_cdnurl()}paimai/yunying/images/eye.png" /></if>
                    </em>
                    <span>建议价</span>
                    <em>{$head.suggest_price}</em>
                </li>
                <?php if(!empty($head['procedure']['protocol_pic'])):?>
                <li class="agreement1 clearfix">
                    <span><img src="{$head.procedure.protocol_pic}"><em>协议照片点击看大图</em></span>
                </li>
                <?php endif;?>
            </ul>
        </div>
		<!-- 检测报告 -->
		{$report}

        <div class="testing" id="auditform">
            <h4>审核结果</h4>
            <ul class="shenhei-tongguo">
                <li class="trial clearfix">
                    <input type="button" name="pass" value="审核通过" class="sheng_hover" />
                    <input type="button" name="reject"  value="审核驳回" />
                </li>
            </ul>
            <div class="textarea-content">
                <div class="textarea-list">
                </div>
                <div class="textarea-list clearfix" style="display:none;">
                    <span>*备注</span><textarea name="remark_reject" placeholder="请填写驳回原"></textarea>
                </div>
            </div>
        </div>
        <div class="yongBtn1" style="display:none;">
            <input type="submit" value="确定" class="queding" />
        </div>
        <div class="clear"></div>
        <div class="xieyi"><span>×</span><img src="#" /></div>
    </div>
    <if condition="$head[status] lt 3">
        <script>$('#auditform').show();</script>
    <else/>
        <script>$('#auditform').hide();</script>
    </if>

    <script>
    $(document).ready(function() {
    	$(".testing ul li span").click(function(){
    		var Img=$(this).find("img").attr("src");
    		$(".pageBeijing").fadeIn();
    		$(".xieyi").fadeIn();
    		$(".xieyi img").attr("src",Img)
    		
    	})
    	$(".xieyi span").click(function(){
    		$(".pageBeijing").fadeOut();
    		$(".xieyi").fadeOut();
    	})
    });
    
    var order_id = '{$head.order_id}';

    $('input[name=pass]').click(function(){
        var msg = '确认审核?';
        confirm_alert('<div style="color:red">'+msg+'</div>',confirm);
        function confirm(){
            $('.determine').click(function(){
                colse_hide();
                audit();
            });
        }

        function audit(){
            var param={
               'order_id':order_id,
               'act':'pass'
           };
           $.post('/AuOrder/audit',param,function(data){
               if(data.code=='200'){
                   btn_alert(data.msg,2000,function(){
                       $(window.opener.document).find("#searchBtn").trigger("click");
			self.close();
                   });
               }else{
                   shibai_alert(data.msg);
               }
           },'json')
        }
    });
    $('.queding').click(function(){
        var msg = '确认驳回？';
        var remark_reject = $('textarea[name=remark_reject]').val();
        if(remark_reject==''){
            shibai_alert('请输入驳回原因。');
            return;
        }
        confirm_alert('<div style="color:red">'+msg+'</div>',confirm);
        function confirm(){
            $('.determine').click(function(){
                colse_hide();
                audit();
            });
        }
        function audit(){
            var param={
                'order_id':order_id,
                'act':'reject',
                'remark_reject':encodeURIComponent(remark_reject)
           };
           $.post('/AuOrder/audit',param,function(data){
               if(data.code=='200'){
                   btn_alert(data.msg,2000,function(){
			//window.location.href='/AuOrder';
			$(window.opener.document).find("#searchBtn").trigger("click");
			self.close();
		   });
               }else{
                   shibai_alert(data.msg);
               }
           },'json')
        }
    });
</script>
</div>
<include file="Public/foot" />
